package com.ziyun.erp.modules.goods.dao;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.plugins.pagination.Pagination;
import com.ziyun.erp.modules.goods.TwbVo.TwbEditPriceVo;
import com.ziyun.erp.modules.goods.TwbVo.TwbGoodsListVo;
import com.ziyun.erp.modules.goods.TwbVo.TwbGoodsVo;
import com.ziyun.erp.modules.goods.TwbVo.TwbStateCollectVo;
import com.ziyun.erp.modules.goods.dto.VerifyFastPriceDto;
import com.ziyun.erp.modules.goods.dto.VerifyPrintPriceDto;
import com.ziyun.erp.modules.goods.entity.GoodsEntity;
import com.ziyun.erp.modules.goods.entity.GoodsOptionEntity;
import com.ziyun.erp.modules.quoteAttribute.entity.QuoteAttributeOptionEntity;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * 商品表
 *
 * @author xueqz
 * @email
 * @date 2018-08-21 08:46:29
 */
@Service("goodsDao")
public interface GoodsDao extends BaseMapper<GoodsEntity> {

    GoodsEntity getAllGoodsProperty(@Param("goodsId") Long goodsId);

    List<GoodsEntity> selectGoodsList(Page<GoodsEntity> page, Map<String, Object> params);

    List<GoodsEntity> getGoodsByIds(@Param("relateDesignIds") String relateDesignIds);

    void addDesign(@Param("goodId") Integer goodId, @Param("designId") Integer designId);

    Integer pushGoods(GoodsEntity goods);

    void updateStatus(@Param("goodsId") Long goodsId, @Param("status") String status);

    List<GoodsOptionEntity> getOptionsByGoodsId(@Param("goodsId") Long goodsId);

    List<Map<String, Object>> getBugDate();

    List<Integer> quotePrice(@Param("ids") String ids, @Param("sellerId") Integer sellerId);

    List<Integer> quotePriceCount(String ids);

    List<VerifyPrintPriceDto> getVerifyPrintPriceDate(@Param("factoryId") Integer factoryId);

    List<QuoteAttributeOptionEntity> getUvType(@Param("weightOptionIds") String weightOptionIds, @Param("uvFlag") boolean uvFlag);

    List<QuoteAttributeOptionEntity> getQuoteAttributeOptionByAttributeTypeValueFromOptionIds(@Param("selectedAttributeIds") String selectedAttributeIds, @Param("value") String value);

    List<VerifyFastPriceDto> getAllGroupPrice(@Param("factoryId") Integer factoryId);

    void hideGoods(@Param("goodsId") Long goodsId);

    void opMarkGoodsByGoodsId(@Param("goodsId") Integer goodsId, @Param("mark") Boolean mark);

    void examineGoods(@Param("goodsId") Integer goodsId, @Param("examine") Integer examine);

    void flagDelBySellerId(@Param("sellerId") Long sellerId);

    List<GoodsEntity> selectGoodsList(@Param("map") Map<String, Object> params);

    List<Map<String, Object>> selectPushList();

    List<TwbGoodsListVo> queryTwbGoodsList(Pagination goodsEntityPage, @Param("params") Map params);

    List<TwbEditPriceVo> editTwbGoodsPrice(@Param("goodsId") Long goodsId);

    void updateHideGoodsByCategoryId(@Param("categoryId") Integer categoryId, @Param("hide") Boolean hide);

    List<Long> beforeUpdateHideGoodsByCategoryId(@Param("categoryId") Integer categoryId, @Param("hide") Boolean hide);

    void twbListOperation(@Param("goodsIds") List<Long> goodsIds, @Param("marketable") String marketable);

    void updateByMap(@Param("map") Map<String, Object> map,@Param("goodsId") Long goodsId); //图文宝分类添加

    List<GoodsEntity> getTwbGoodsImageBugData();

    TwbStateCollectVo getTwbGoodsStateCount(@Param("sellerId") Long sellerId);

    List<GoodsEntity> selectTwbSelfGoodsAndSellerPushStatus(@Param("sellerId") Long sellerId);
}
